CFLAGS= -c -Wall
CFLAGS_MAIN= -Wall -lz -o getlog -lcrypto

SOURCE_LOGGER = logger.c
SOURCE_SECLOGGER = sec_logger.c
SOURCE_GETLOG = getlog.c

DEPENDS_LOGGER = $(SOURCE_LOGGER) 
DEPENDS_SECLOGGER = $(SOURCE_SECLOGGER) 
DEPENDS_GETLOG = $(SOURCE_GETLOG) $(OBJECTS_GETLOG)

OBJECTS_GETLOG = logger.o sec_logger.o ../twofish/myTwofish2.o ../twofish/zlib_use.o ../twofish/twofish2.o ../sha2/sha2.o

.PHONY: clean

all: clean logger sec_logger getlog

clean:
	-rm -rf *.o *.*~ *.xml getlog

logger: $(DEPENDS_LOGGER)
	cc $(CFLAGS) $(SOURCE_LOGGER)

sec_logger: $(DEPENDS_SECLOGGER)
	cc $(CFLAGS) $(SOURCE_SECLOGGER)

getlog: $(DEPENDS_GETLOG)
	cc  $(SOURCE_GETLOG) $(OBJECTS_GETLOG) $(CFLAGS_MAIN)
	
